repo.or.cz
/
and.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Waterloo ACM Programming Contest Fall 2
[and.git]
/
10110 - Light, more light
/
p10110_Accepted.~dpr
blob
cac7285b49820b37e4f4e38ad12d416f5ef21ee2
1
program p10110_Accepted;
\r
2
\r
3
{$APPTYPE CONSOLE}
\r
4
\r
5
uses
\r
6
Math;
\r
7
\r
8
var
\r
9
n, raiz : Double;
\r
10
\r
11
begin
\r
12
read(n);
\r
13
while n <> 0 do
\r
14
begin
\r
15
raiz := sqrt(n);
\r
16
if raiz = floor(raiz) then //Si raiz es entero...
\r
17
//Entonces n es un cuadrado perfecto,
\r
18
//y por lo tanto tiene un nĂºmero impar
\r
19
//de divisores
\r
20
writeLn('yes')
\r
21
else
\r
22
writeLn('no');
\r
23
read(n);
\r
24
end;
\r
25
end.
\r